how to take array input using scanner in java